package staticFactory.a2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test1 {
    public static void main(String[] args) {
        //1.AppliocationContext
        ApplicationContext ac=
                new ClassPathXmlApplicationContext("applicationContext.xml");
        Student stu=ac.getBean("b2", Student.class);
        //2. 用AppliocationContext获取HelloSpring对象
        //根据bean配置 :  id(b1)获取HelloSpring对象
        System.out.println(stu);
    }
}
